
export interface IWriter {
    finish(): Uint8Array;
}

export interface IProtocol<T = any> {
    create(properties?: T): T;
    encode(message: T, writer?: any): IWriter;
    decode(reader: Uint8Array, length?: number): T;
}

export type IProtocolMsg<T> = (msg: T) => void;

export interface IProtocolBody {

}